<!DOCTYPE html>
<html lang="en">

<head>
	<meta charset="UTF-8">
	<meta name="viewport" content="width=device-width, initial-scale=1.0">
	<title>Document</title>
</head>

<body>
	<script src="">
		function sum(...args) {
			let nums = args

			function add(...targs) {
				nums.push(...targs)
				console.log(nums);

				return sum
			}

			const value = function value() {
				let total = nums.reduce((result, item) => {
					return result + item
				}, 0)
				console.log(total);

				return total
			}


			return add
		}

		console.log(sum(1)(2).value);

	</script>
	<script src="">
		let i = 0,  // 页数
			sum = 0  // 累加的数字

		while (sum < 1095) {
			i++
			sum++

			if (i > 9) {
				sum++
				if (i > 99) {
					sum++
				}
			}
		}
		console.log(i);



	</script>
	<script>

	</script>
</body>

</html>